
package com.haiyou.data.common.accessor.annotation;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.springframework.stereotype.Component;

import com.haiyou.data.common.persister.mysql.annotation.SyncPolicy;




/**
 * 
 * 
 * @Description: 缓存策略
 * @author xingyuan
 * @date 2022年9月20日 下午3:44:45
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Inherited
@Documented
@Component
public @interface BucketCachedPolicy {

	/**
	 * 缓存大小
	 * @return
	 */
	SizePolicy sizePolicy() default @SizePolicy();

	/**
	 * 异步定时入库时效
	 * @return
	 */
	SyncPolicy syncPolicy() default @SyncPolicy();

	/**
	 * 缓存有效时长
	 * @return
	 */
	ExpiryPolicy expiryPolicy() default @ExpiryPolicy();
	
	/**
	 * accessor 操作类型
	 */
	BucketAccessorType accessorType() default @BucketAccessorType();
	
}
